Integrand size = 28, antiderivative size = 75 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=a^3 x+\frac {b \left (2 a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{2 d}-\frac {a b^2 \tan (c+d x)}{2 d}-\frac {b^2 (a+b \sec (c+d x)) \tan (c+d x)}{2 d} \]
a^3*x+1/2*b*(2*a^2-b^2)*arctanh(sin(d*x+c))/d-1/2*a*b^2*tan(d*x+c)/d-1/2*b ^2*(a+b*sec(d*x+c))*tan(d*x+c)/d
Time = 0.02 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=a^3 x+\frac {a^2 b \text {arctanh}(\sin (c+d x))}{d}-\frac {b^3 \text {arctanh}(\sin (c+d x))}{2 d}-\frac {a b^2 \tan (c+d x)}{d}-\frac {b^3 \sec (c+d x) \tan (c+d x)}{2 d} \]
a^3*x + (a^2*b*ArcTanh[Sin[c + d*x]])/d - (b^3*ArcTanh[Sin[c + d*x]])/(2*d ) - (a*b^2*Tan[c + d*x])/d - (b^3*Sec[c + d*x]*Tan[c + d*x])/(2*d)
Time = 0.34 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.01, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.214, Rules used = {3042, 4530, 25, 3042, 4406, 2009}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a^2-b^2 \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )dx\) |
\(\Big \downarrow \) 4530 |
\(\displaystyle -\int -\left ((a-b \sec (c+d x)) (a+b \sec (c+d x))^2\right )dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \int (a-b \sec (c+d x)) (a+b \sec (c+d x))^2dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \left (a-b \csc \left (c+d x+\frac {\pi }{2}\right )\right ) \left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2dx\) |
\(\Big \downarrow \) 4406 |
\(\displaystyle \frac {1}{2} \int \left (2 a^3-b^2 \sec ^2(c+d x) a+b \left (2 a^2-b^2\right ) \sec (c+d x)\right )dx-\frac {b^2 \tan (c+d x) (a+b \sec (c+d x))}{2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{2} \left (2 a^3 x+\frac {b \left (2 a^2-b^2\right ) \text {arctanh}(\sin (c+d x))}{d}-\frac {a b^2 \tan (c+d x)}{d}\right )-\frac {b^2 \tan (c+d x) (a+b \sec (c+d x))}{2 d}\) |
-1/2*(b^2*(a + b*Sec[c + d*x])*Tan[c + d*x])/d + (2*a^3*x + (b*(2*a^2 - b^ 2)*ArcTanh[Sin[c + d*x]])/d - (a*b^2*Tan[c + d*x])/d)/2
3.7.75.3.1 Defintions of rubi rules used
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d _.) + (c_)), x_Symbol] :> Simp[(-b)*d*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m - 1)/(f*m)), x] + Simp[1/m Int[(a + b*Csc[e + f*x])^(m - 2)*Simp[a^2*c*m + (b^2*d*(m - 1) + 2*a*b*c*m + a^2*d*m)*Csc[e + f*x] + b*(b*c*m + a*d*(2*m - 1))*Csc[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b* c - a*d, 0] && GtQ[m, 1] && NeQ[a^2 - b^2, 0] && IntegerQ[2*m]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_.))*(csc[(e_.) + (f_.)*(x_)]*(b_. ) + (a_))^(m_.), x_Symbol] :> Simp[C/b^2 Int[(a + b*Csc[e + f*x])^(m + 1) *Simp[-a + b*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, C, m}, x] && EqQ[A*b^2 + a^2*C, 0]
Time = 0.53 (sec) , antiderivative size = 82, normalized size of antiderivative = 1.09
method | result | size |
derivativedivides | \(\frac {a^{3} \left (d x +c \right )-a \,b^{2} \tan \left (d x +c \right )+a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(82\) |
default | \(\frac {a^{3} \left (d x +c \right )-a \,b^{2} \tan \left (d x +c \right )+a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )-b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}\) | \(82\) |
parts | \(a^{3} x +\frac {a^{2} b \ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{d}-\frac {b^{3} \left (\frac {\sec \left (d x +c \right ) \tan \left (d x +c \right )}{2}+\frac {\ln \left (\sec \left (d x +c \right )+\tan \left (d x +c \right )\right )}{2}\right )}{d}-\frac {a \,b^{2} \tan \left (d x +c \right )}{d}\) | \(83\) |
parallelrisch | \(\frac {-\left (1+\cos \left (2 d x +2 c \right )\right ) b \left (a^{2}-\frac {b^{2}}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )+\left (1+\cos \left (2 d x +2 c \right )\right ) b \left (a^{2}-\frac {b^{2}}{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+a^{3} x d \cos \left (2 d x +2 c \right )+a^{3} x d -a \,b^{2} \sin \left (2 d x +2 c \right )-\sin \left (d x +c \right ) b^{3}}{d \left (1+\cos \left (2 d x +2 c \right )\right )}\) | \(135\) |
risch | \(a^{3} x +\frac {i b^{2} \left (b \,{\mathrm e}^{3 i \left (d x +c \right )}-2 a \,{\mathrm e}^{2 i \left (d x +c \right )}-b \,{\mathrm e}^{i \left (d x +c \right )}-2 a \right )}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}+\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) a^{2}}{d}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{2 d}-\frac {b \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) a^{2}}{d}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right )}{2 d}\) | \(153\) |
norman | \(\frac {a^{3} x +a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}+\frac {b^{2} \left (2 a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{d}-2 a^{3} x \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-\frac {b^{2} \left (2 a +b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}-\frac {b \left (2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 d}+\frac {b \left (2 a^{2}-b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 d}\) | \(162\) |
1/d*(a^3*(d*x+c)-a*b^2*tan(d*x+c)+a^2*b*ln(sec(d*x+c)+tan(d*x+c))-b^3*(1/2 *sec(d*x+c)*tan(d*x+c)+1/2*ln(sec(d*x+c)+tan(d*x+c))))
Time = 0.28 (sec) , antiderivative size = 116, normalized size of antiderivative = 1.55 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=\frac {4 \, a^{3} d x \cos \left (d x + c\right )^{2} + {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (\sin \left (d x + c\right ) + 1\right ) - {\left (2 \, a^{2} b - b^{3}\right )} \cos \left (d x + c\right )^{2} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (2 \, a b^{2} \cos \left (d x + c\right ) + b^{3}\right )} \sin \left (d x + c\right )}{4 \, d \cos \left (d x + c\right )^{2}} \]
1/4*(4*a^3*d*x*cos(d*x + c)^2 + (2*a^2*b - b^3)*cos(d*x + c)^2*log(sin(d*x + c) + 1) - (2*a^2*b - b^3)*cos(d*x + c)^2*log(-sin(d*x + c) + 1) - 2*(2* a*b^2*cos(d*x + c) + b^3)*sin(d*x + c))/(d*cos(d*x + c)^2)
\[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=\int \left (a - b \sec {\left (c + d x \right )}\right ) \left (a + b \sec {\left (c + d x \right )}\right )^{2}\, dx \]
Time = 0.19 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.24 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=\frac {4 \, {\left (d x + c\right )} a^{3} + b^{3} {\left (\frac {2 \, \sin \left (d x + c\right )}{\sin \left (d x + c\right )^{2} - 1} - \log \left (\sin \left (d x + c\right ) + 1\right ) + \log \left (\sin \left (d x + c\right ) - 1\right )\right )} + 4 \, a^{2} b \log \left (\sec \left (d x + c\right ) + \tan \left (d x + c\right )\right ) - 4 \, a b^{2} \tan \left (d x + c\right )}{4 \, d} \]
1/4*(4*(d*x + c)*a^3 + b^3*(2*sin(d*x + c)/(sin(d*x + c)^2 - 1) - log(sin( d*x + c) + 1) + log(sin(d*x + c) - 1)) + 4*a^2*b*log(sec(d*x + c) + tan(d* x + c)) - 4*a*b^2*tan(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 149 vs. \(2 (69) = 138\).
Time = 0.30 (sec) , antiderivative size = 149, normalized size of antiderivative = 1.99 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=\frac {2 \, {\left (d x + c\right )} a^{3} + {\left (2 \, a^{2} b - b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right ) - {\left (2 \, a^{2} b - b^{3}\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right ) + \frac {2 \, {\left (2 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 2 \, a b^{2} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - b^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{2}}}{2 \, d} \]
1/2*(2*(d*x + c)*a^3 + (2*a^2*b - b^3)*log(abs(tan(1/2*d*x + 1/2*c) + 1)) - (2*a^2*b - b^3)*log(abs(tan(1/2*d*x + 1/2*c) - 1)) + 2*(2*a*b^2*tan(1/2* d*x + 1/2*c)^3 - b^3*tan(1/2*d*x + 1/2*c)^3 - 2*a*b^2*tan(1/2*d*x + 1/2*c) - b^3*tan(1/2*d*x + 1/2*c))/(tan(1/2*d*x + 1/2*c)^2 - 1)^2)/d
Time = 16.75 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.83 \[ \int (a+b \sec (c+d x)) \left (a^2-b^2 \sec ^2(c+d x)\right ) \, dx=\frac {2\,a^3\,\mathrm {atan}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {b^3\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {b^3\,\sin \left (c+d\,x\right )}{2\,d\,{\cos \left (c+d\,x\right )}^2}+\frac {2\,a^2\,b\,\mathrm {atanh}\left (\frac {\sin \left (\frac {c}{2}+\frac {d\,x}{2}\right )}{\cos \left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}-\frac {a\,b^2\,\sin \left (c+d\,x\right )}{d\,\cos \left (c+d\,x\right )} \]